﻿using Soul.IdentityServer.Models;

namespace Hosting.Infrastructure
{
    public static class Config
    {
        public static IEnumerable<Client> Clients
        {
            get
            {
                yield return new Client()
                {
                    ClientId = "pc",
                    ClientSecrets =
                    {
                       new Secret("1024".Sha256())
                    },
                    AllowedGrantTypes =
                    {
                        OpenIdConnectGrantTypes.Password
                    },
                    AllowedScopes =
                    {
                        OpenIdConnectScopes.OpenId
                    }
                };
            }
        }

        public static IEnumerable<Resource> Resources
        {
            get
            {
                yield return new ApiScope("baseapi");
                yield return OpenIdConnectResources.OpenId;
            }
        }
    }
}
